Creates a string according to the specified character, or the first character of a string expression that is passed to the function.
与えられた 1 キャラクタ (ないしは文字列表式の最初の 1 文字) を指定回数分繰り返した文字列を作成します。
String (n As Long, {expression As Integer | character As String})
String (n As Integer, {expression As Integer | character As String})
String
文字列
n: Numeric expression that indicates the number of characters to return in the string. The maximum allowed value of n is 65535.
n: キャラクタを繰り返す回数を示す数値表式。
Expression: Numeric expression that defines the ASCII code for the character.
Expression: キャラクタの ASCII コードを示す数値表式。
Character: Any single character used to build the return string, or any string of which only the first character will be used.
Character: 繰り返し文字列を作成するための 1 キャラクタ。複数キャラクタからなる文字列を指定した場合は、最初の 1 キャラクタが適用されます。
Sub ExampleString
Sub ExampleString
Dim sText as String
Dim sText as String
sText = String(10,"A")
sText = String(10,"A")
Msgbox sText
Msgbox sText
sText = String(10,65)
sText = String(10,65)
Msgbox sText
Msgbox sText
End Sub
End Sub